{% extends "base.html" %}

{% block head-title %}{{algorithm.algorithm_name}}{% endblock %}

{% block title %}{{algorithm.algorithm_name}}{% endblock %} 

{% block content %}
<script src="/static/js/deep_learning/3.js"></script>
<form action="/deep_learning/configure_parameters/" method="post" class="uk-form" id="form1"
					onsubmit="return onForm1Submit();">
	{%csrf_token%}
	<input type="hidden" name="instance_id" value="{{algorithm.instance_id}}"/>
	<fieldset>
		{% if algorithm.algorithm_name == "深度学习-LSTM" %}
		<legend>配置参数(3/3)</legend>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				训练周期:
				<select name="epochs">
					<option value="10">10</option>
					<option value="50" selected>50</option>
					<option value="100">100</option>
					<option value="150">150</option>
					<option value="200">200</option>
					<option value="250">250</option>
					<option value="300">300</option>
				</select>
			</div>
		</div>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				观察窗口:
				<select name="look_back">
					<option value="1">1</option>
					<option value="2">2</option>
					<option value="3">3</option>
					<option value="4">4</option>
					<option value="5">5</option>
				</select>
			</div>
		</div>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				神经元数:
				<select name="lstm_units">
					<option value="8">8</option>
					<option value="16">16</option>
					<option value="32">32</option>
					<option value="64">64</option>
				</select>
			</div>
		</div>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				训练样本:
				<select name="train_ratio">
					<option value="70">70</option>
					<option value="80" selected>80</option>
					<option value="90">90</option>
				</select>(%)
			</div>
		</div>
		{% else %}
		<legend>配置参数(3/4)</legend>
				{% for item in algorithm.hidden_layer_units %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						隐藏层{{ forloop.counter }}神经元数:
						<select name="hidden_layer_units">
							<option value="2">2</option>
							<option value="4">4</option>
							<option value="8" selected>8</option>
							<option value="16">16</option>
							<option value="32">32</option>
							<option value="64">64</option>
							<option value="128">128</option>
						</select>
					</div>
				</div>
				{% endfor %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						优化函数:
						<select name="optimizer">
							<option value="adam" selected>adam</option>
							<option value="rmsprop">rmsprop</option>
							<option value="sgd">sgd</option>
						</select>
					</div>
				</div>
				<div class="uk-form-row">
					<div class="uk-form-controls">
						训练周期:
						<select name="epochs">
							<option value="10">10</option>
							<option value="50" selected>50</option>
							<option value="100">100</option>
							<option value="150">150</option>
							<option value="200">200</option>
							<option value="250">250</option>
							<option value="300">300</option>
						</select>
					</div>
				</div>
				<div class="uk-form-row">
					<div class="uk-form-controls">
						批次大小:
						<select name="batch_size">
							<option value="1">1</option>
							<option value="16">16</option>
							<option value="32" selected>32</option>
							<option value="64">64</option>
							<option value="128">128</option>
							<option value="256">256</option>
						</select>
					</div>
				</div>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				训练样本:<input type="number" value="80" name="train_size" />(%)
			</div>
		</div>
		<div class="uk-form-row">
			<div class="uk-form-controls">
				测试样本:<input type="number" value="20" name="test_size" />(%)
			</div>
		</div>
		{% endif %}
	</fieldset>
	<div class="uk-form-row" style="margin-top:5px;">
		<a href="javascript:history.go(-1);" class="uk-button">上一步</a>
		<input class="uk-button uk-button-primary" type="submit"
			value="下一步" style="float: right;">
	</div>
</form>
{% endblock %}